package com.huawei;

import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * Description: HJ3 明明的随机数
 *
 * @author weiruibai.vendor
 * Date: 2022/10/8 11:04
 */
public class HJ3 {

    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int[] nums = new int[N];
        Set<Integer> set = new HashSet<>();
        int index = 0;
        for (int i = 0; i < N; i++) {

            Integer num = scanner.nextInt();

            if (set.add(num)) {
                nums[index++] = num;
            }
        }
        Arrays.sort(nums);
        for (int i = 0; i < N; i++) {
            if (nums[i] == 0) {
                continue;
            }
            System.out.println(nums[i]);
        }
    }
}
